package com.hero.basicsystem.dao.ibatis;

import com.hero.basicsystem.dao.IUserdictionaryDAO;
import com.hero.basicsystem.entity.Userdictionary;
import com.hero.basicsystem.entity.UserdictionaryExample;
import com.hero.basicsystem.entity.UserdictionaryKey;
import com.hero.web.dao.IbatisBaseDao;
import java.util.List;

public class UserdictionaryDAOImpl extends IbatisBaseDao<Userdictionary, UserdictionaryExample> implements IUserdictionaryDAO {

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public UserdictionaryDAOImpl() {
        super();
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int countByExample(UserdictionaryExample example) {
        Integer count = (Integer)  getSqlMapClientTemplate().queryForObject("userdictionary.ibatorgenerated_countByExample", example);
        return count;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int deleteByExample(UserdictionaryExample example) {
        int rows = getSqlMapClientTemplate().delete("userdictionary.ibatorgenerated_deleteByExample", example);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int deleteByPrimaryKey(UserdictionaryKey key) {
        int rows = getSqlMapClientTemplate().delete("userdictionary.ibatorgenerated_deleteByPrimaryKey", key);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public void insert(Userdictionary record) {
        getSqlMapClientTemplate().insert("userdictionary.ibatorgenerated_insert", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public void insertSelective(Userdictionary record) {
        getSqlMapClientTemplate().insert("userdictionary.ibatorgenerated_insertSelective", record);
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    @SuppressWarnings("unchecked")
    public List<Userdictionary> selectByExample(UserdictionaryExample example) {
        List<Userdictionary> list = getSqlMapClientTemplate().queryForList("userdictionary.ibatorgenerated_selectByExample", example);
        return list;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public Userdictionary selectByPrimaryKey(UserdictionaryKey key) {
        Userdictionary record = (Userdictionary) getSqlMapClientTemplate().queryForObject("userdictionary.ibatorgenerated_selectByPrimaryKey", key);
        return record;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByExampleSelective(Userdictionary record, UserdictionaryExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userdictionary.ibatorgenerated_updateByExampleSelective", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByExample(Userdictionary record, UserdictionaryExample example) {
        UpdateByExampleParms parms = new UpdateByExampleParms(record, example);
        int rows = getSqlMapClientTemplate().update("userdictionary.ibatorgenerated_updateByExample", parms);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByPrimaryKeySelective(Userdictionary record) {
        int rows = getSqlMapClientTemplate().update("userdictionary.ibatorgenerated_updateByPrimaryKeySelective", record);
        return rows;
    }

    /**
     * This method was generated by Apache iBATIS ibator.
     * This method corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    public int updateByPrimaryKey(Userdictionary record) {
        int rows = getSqlMapClientTemplate().update("userdictionary.ibatorgenerated_updateByPrimaryKey", record);
        return rows;
    }

    /**
     * This class was generated by Apache iBATIS ibator.
     * This class corresponds to the database table userdictionary11
     *
     * @ibatorgenerated Sun Jun 12 08:41:54 GMT 2011
     */
    private static class UpdateByExampleParms extends UserdictionaryExample {
        private Object record;

        public UpdateByExampleParms(Object record, UserdictionaryExample example) {
            super(example);
            this.record = record;
        }

        public Object getRecord() {
            return record;
        }
    }
}